package com.zhl.web_hello_world;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class Controller {

    @Autowired
    Service service;

    @RequestMapping("")
    public String idnex(){
        return "小肥仔,更新一次";
    }

    @RequestMapping("test")
    public String test(@RequestParam("count") Integer count){
        return service.work(count);
    }

    @RequestMapping("sleep")
    public String sleep(@RequestParam("sleep") Integer sleep){
        return service.sleep(sleep);
    }

}
